public class Typen { public static void main(String arg[]) { // Deklaration String text = "Hallo Welt!"; // "Integer" sind Ganzzahlen int num = -2147483648; // "float" und "double" sind Zahlen mit Nachkommastellen float karlheinz = 2111.321f; boolean b = true; // deklarierte Variablen dürfen einfach benutzt werden text = "" + 23; // type coercion: int wird string System.out.print(text + " foobar " + num + " " + karlheinz); } }